#include <bits/stdc++.h>
using namespace std;
class Solution {
public:
    bool canSumToTarget(vector<int> &nums, int target) {
        int n = nums.size();
        vector<int> dp(target + 1, false);
        dp[0] = true;
        for (auto &num : nums) {
            for (int t = target; t >= num; --t) {
                dp[t] |= dp[t - num];
            }
        }
        return dp[target];
    }
    bool canPartition(vector<int> &nums) {
        int n = nums.size();
        if (n < 2) {
            return false;
        }
        int sum = 0, maxnum = 0;
        for (auto &num : nums) { sum += num; maxnum = max(maxnum, num); }
        int target = sum >> 1;
        if ((sum & 1) || maxnum > target) {
            return false;
        }
        return canSumToTarget(nums, target);
    }
};

int main() {
    vector<int> nums;
    int n;
    while (cin >> n) {
        nums.push_back(n);
    }
    cout << Solution().canPartition(nums);
    return 0;
}